<%@LANGUAGE="VBSCRIPT" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>CODs</title>
<link href="UniversalStyleSheet.css" rel="stylesheet" type="text/css" />
</head>

<body>
<form id="CODsForm" name="CODsForm" method="post" action="AdminCODs.asp?action=save">
 <p>&nbsp; </p>
 <table width="500" border="0" cellpadding="0" cellspacing="1" bgcolor="#006600" style="border-style:outset; border-width:thin">
  <tr>
   <td bgcolor="#FFFFFF" class="TableTitles">
<%
dim fs
filepath=server.MapPath("access/backend/CODs.txt")

set fs=server.CreateObject("scripting.filesystemobject")

if request.QueryString("action")="save" then
	set f=fs.OpenTextFile(filepath,2,true)
	f.Write(request.Form("CODs"))
	f.Close
	%><script type="text/vbscript">msgbox"COD settings saved."</script><%
end if

if not fs.fileexists(filepath) then 
	fs.createtextfile(filepath)
end if

set f=fs.OpenTextFile(filepath,1,true)

if not f.AtEndOfStream then
	CODs=f.readline()
else
	CODs="nothin'"
end if

f.close
set f=Nothing
set fs=Nothing
%>


   
    <p class="ResultsName">Allow COD's:</p>
    <p class="TableTitles">&nbsp; - Yes
    <% if CODs="yes" then chk="checked='checked'" else chk="" %>
     <input name="CODs" type="radio" value="yes" <%= chk %>/>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	- No
	<% if CODs="no" then chk="checked='checked'" else chk="" %>
	<input name="CODs" type="radio" value="no" <%= chk %>/>
    </p>
   </td>
  </tr>
  <tr>
   <td align="right" bgcolor="#FFFFFF"><img src="Images/SaveButton.png" alt="Save" name="BtnSave" width="60" height="30" id="BtnSave" onclick="vbscript: CODsForm.Submit()"/>&nbsp; </td>
  </tr>
 </table>
</form>
</body>
</html>
